Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SetDefaultDigestAlgorithm #29

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hslatman
Copy link
Member

No description provided.

@hslatman hslatman linked an issue Sep 10, 2024 that may be closed by this pull request
Base automatically changed from herman/support-windows-scep-request-certificates to main September 11, 2024 09:15
@stv0g stv0g mentioned this pull request Sep 17, 2024
@stv0g
Copy link

stv0g commented Sep 17, 2024

I dont think its a good way to configure the digest alg like this.

We should redesign the API, release a v2 of the package which passes the algorithm directly in the digest / encrypt operations.

@hslatman
Copy link
Member Author

hslatman commented Sep 17, 2024

@stv0g I don't disagree with you 😛

The goal of this change is to keep the current logic intact, while having a backwards compatible change to support a better hashing algorithm if implementers choose to do so. It's fairly similar to existing knobs exposed in the package. We don't intend this to be the new API.

@pkpfr
Copy link

pkpfr commented Sep 26, 2024

+1 for this. I have a requirement to use AES256. Apple are no longer supporting SHA1 on some of their non-public verification APIs and we cannot implement their specification without this.

@faisal-memon
Copy link

There is already a SetDigestAlgorithm() function to change the digest to use. Is that not working?

@hslatman
Copy link
Member Author

There is already a SetDigestAlgorithm() function to change the digest to use. Is that not working?

It works, but that has be called on every new instanced of SignedData. It can happen that the SignedData isn't easily accessible, making it harder to change on a per-use basis. The new function allows to override the package default for an entire application, which makes things a bit simpler to implement and reason about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of deprecated sha1
4 participants